home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / emacs / build-install < prev    next >
Text File  |  1992-10-03  |  991b  |  39 lines

  1. #!/bin/sh
  2. # Shell script for building and installing Emacs.
  3. # This is an alternative to `make install', 
  4. # and it still exists just because it always has.
  5. set -x
  6.  
  7. EMACS=/usr/local/emacs
  8. BIN=/usr/local/bin
  9.  
  10. /bin/sed "s;/usr/local/emacs;$EMACS;" < src/paths.h-dist > src/paths.h
  11.  
  12. (cd etc; make) || exit 1
  13. (cd src; make) || exit 1
  14.  
  15. # The double quotes prevent an error from sh on Suns 
  16. # when the directory does not exist yet.
  17. # We use sh -c pwd instead of just pwd because on some systems (Suns?)
  18. # plan pwd tends to give back the specified name sometimes.
  19. if [ `sh -c pwd` != "`(cd $EMACS; sh -c pwd)`" ]
  20. then
  21.   mv `pwd` $EMACS
  22.   if [ $? != '0' ]
  23.   then
  24.     mkdir $EMACS
  25.     echo mv `pwd` to $EMACS failed--using tar to copy.
  26.     tar cf - . | (cd $EMACS; umask 0; tar xf -)
  27.     if [ $? != '0' ]
  28.     then
  29.       echo tar-copying `pwd` to $EMACS failed.
  30.       exit 1
  31.     fi
  32.   fi
  33. fi
  34.  
  35. cp $EMACS/etc/[ce]tags $BIN
  36. cp $EMACS/etc/emacsclient $BIN
  37. mv $EMACS/src/xemacs $BIN/emacs
  38. rm $EMACS/src/temacs
  39.